package com.rfid.webp2plib;

import java.util.Objects;

/**
 * Created by deanliu on 2019/8/30.
 */

public class User {


    /**
     * data : {"ver":"1.01","code":"1","ip":"127.0.0.1","pkg":"ddd"}
     * id : iLQziUlPSVr1QIE8AAAL
     */

    private DataBean data;
    private String id;

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public static class DataBean {
        /**
         * ver : 1.01
         * code : 1
         * ip : 127.0.0.1
         * pkg : ddd
         */

        private String ver;
        private String code;
        private String ip;
        private String pkg;
        private String name;
        private String deviceId;
        private String extraInfo;

        public String getExtraInfo() {
            return extraInfo;
        }

        public void setExtraInfo(String extraInfo) {
            this.extraInfo = extraInfo;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDeviceId() {
            return deviceId;
        }

        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }

        public String getVer() {
            return ver;
        }

        public void setVer(String ver) {
            this.ver = ver;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

        public String getPkg() {
            return pkg;
        }

        public void setPkg(String pkg) {
            this.pkg = pkg;
        }

        @Override
        public String toString() {
            return "DataBean{" +
                    "ver='" + ver + '\'' +
                    ", code='" + code + '\'' +
                    ", ip='" + ip + '\'' +
                    ", pkg='" + pkg + '\'' +
                    ", name='" + name + '\'' +
                    ", deviceId='" + deviceId + '\'' +
                    '}';
        }
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    @Override
    public String toString() {
        return "User{" +
                "data=" + data +
                ", id='" + id + '\'' +
                '}';
    }
}
